/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024.
 * Description: non-linefetch fault dfx header
 * Author: wanglinhui <wanglinhui@huawei.com>
 * Create: 2024-05-30
 */
#ifndef RTOS_FAULT_H
#define RTOS_FAULT_H
#include <asm/ptrace.h>

void do_bad_area_user_fixup(unsigned long addr, unsigned int fsr,
	struct pt_regs *regs, bool user_fixup);

#ifdef CONFIG_RTOS_HAL_NON_LINEFETCH_DFX_ENHANCE
void init_non_linefetch_fault_code(void);
bool get_non_linefetch_dfx_enhance(void);
int rtos_get32t_unaligned_check(unsigned int *val, unsigned long addr);
#else
static inline void init_non_linefetch_fault_code(void)
{}
#endif /* CONFIG_RTOS_HAL_NON_LINEFETCH_DFX_ENHANCE */

#endif /* RTOS_FAULT_H */
